package com.example.qy160demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.context.annotation.Configuration;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
@TableName(value = "emp")
public class Emp implements Serializable {
    @TableId(value = "empNo",type = IdType.AUTO)
    private Integer empNo;
    private String ename;
    private String job;
    private Integer mgr;
    //JsonFormat 向前端发送事件格式设置
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date hiredate;
    //不可以使用double float  他会有精度丢失的问题  BigDecimal big带思茅
    private BigDecimal sal;
    private BigDecimal comm;
    private Integer deptno;
    //关联部门   多对一
    @TableField(exist = false)
    private Dept dept;

}
